set(WebKit_INCLUDE_DIRECTORIES
    "${CMAKE_SOURCE_DIR}/Source"
    "${JAVASCRIPTCORE_DIR}/ForwardingHeaders"
    "${WEBKIT_DIR}"
    "${WEBCORE_DIR}"
    "${WEBCORE_DIR}/ForwardingHeaders"
    "${WEBCORE_DIR}/Modules/geolocation"
    "${WEBCORE_DIR}/Modules/filesystem"
    "${WEBCORE_DIR}/Modules/mediastream"
    "${WEBCORE_DIR}/Modules/navigatorcontentutils"
    "${WEBCORE_DIR}/Modules/networkinfo"
    "${WEBCORE_DIR}/Modules/webdatabase"
    "${WEBCORE_DIR}/Modules/websockets"
    "${WEBCORE_DIR}/accessibility"
    "${WEBCORE_DIR}/bindings/generic"
    "${WEBCORE_DIR}/bindings/js"
    "${WEBCORE_DIR}/bindings"
    "${WEBCORE_DIR}/bridge"
    "${WEBCORE_DIR}/bridge/c"
    "${WEBCORE_DIR}/bridge/jsc"
    "${WEBCORE_DIR}/css"
    "${WEBCORE_DIR}/dom"
    "${WEBCORE_DIR}/dom/default"
    "${WEBCORE_DIR}/editing"
    "${WEBCORE_DIR}/fileapi"
    "${WEBCORE_DIR}/history"
    "${WEBCORE_DIR}/html"
    "${WEBCORE_DIR}/html/forms"
    "${WEBCORE_DIR}/html/shadow"
    "${WEBCORE_DIR}/inspector"
    "${WEBCORE_DIR}/loader"
    "${WEBCORE_DIR}/loader/archive"
    "${WEBCORE_DIR}/loader/appcache"
    "${WEBCORE_DIR}/loader/icon"
    "${WEBCORE_DIR}/loader/cache"
    "${WEBCORE_DIR}/page"
    "${WEBCORE_DIR}/page/animation"
    "${WEBCORE_DIR}/page/scrolling"
    "${WEBCORE_DIR}/platform"
    "${WEBCORE_DIR}/page/animation"
    "${WEBCORE_DIR}/page/scrolling"
    "${WEBCORE_DIR}/platform"
    "${WEBCORE_DIR}/platform/animation"
    "${WEBCORE_DIR}/platform/audio"
    "${WEBCORE_DIR}/platform/graphics"
    "${WEBCORE_DIR}/platform/graphics/filters"
    "${WEBCORE_DIR}/platform/graphics/harfbuzz"
    "${WEBCORE_DIR}/platform/graphics/harfbuzz/ng"
    "${WEBCORE_DIR}/platform/graphics/opengl"
    "${WEBCORE_DIR}/platform/graphics/transforms"
    "${WEBCORE_DIR}/platform/mediastream"
    "${WEBCORE_DIR}/platform/mock"
    "${WEBCORE_DIR}/platform/network"
    "${WEBCORE_DIR}/platform/sql"
    "${WEBCORE_DIR}/platform/text"
    "${WEBCORE_DIR}/plugins"
    "${WEBCORE_DIR}/rendering"
    "${WEBCORE_DIR}/rendering/line"
    "${WEBCORE_DIR}/rendering/shapes"
    "${WEBCORE_DIR}/rendering/style"
    "${WEBCORE_DIR}/storage"
    "${WEBCORE_DIR}/style"
    "${WEBCORE_DIR}/svg"
    "${WEBCORE_DIR}/svg/animation"
    "${WEBCORE_DIR}/svg/graphics"
    "${WEBCORE_DIR}/svg/properties"
    "${WEBCORE_DIR}/workers"
    "${JAVASCRIPTCORE_DIR}"
    "${JAVASCRIPTCORE_DIR}/API"
    "${JAVASCRIPTCORE_DIR}/assembler"
    "${JAVASCRIPTCORE_DIR}/bytecode"
    "${JAVASCRIPTCORE_DIR}/bytecompiler"
    "${JAVASCRIPTCORE_DIR}/disassembler"
    "${JAVASCRIPTCORE_DIR}/dfg"
    "${JAVASCRIPTCORE_DIR}/heap"
    "${JAVASCRIPTCORE_DIR}/debugger"
    "${JAVASCRIPTCORE_DIR}/interpreter"
    "${JAVASCRIPTCORE_DIR}/llint"
    "${JAVASCRIPTCORE_DIR}/parser"
    "${JAVASCRIPTCORE_DIR}/profiler"
    "${JAVASCRIPTCORE_DIR}/runtime"
    "${JAVASCRIPTCORE_DIR}/jit"
    "${JAVASCRIPTCORE_DIR}/bindings"
    "${WTF_DIR}"
    "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
    "${DERIVED_SOURCES_WEBCORE_DIR}"
    "${DERIVED_SOURCES_DIR}/ForwardingHeaders"
    "${CMAKE_BINARY_DIR}"
)


set(WebKit_LIBRARIES
    JavaScriptCore
    WTF
    WebCore
    ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES}
    ${CDROID_LIBRARIES}
)
message("CAIRO_INCLUDE_DIRECTORIES=${CAIRO_INCLUDE_DIRS} WTF=${WTF_DIR}")
if(USE_SOUP)
    set(NETWORVK_INCLUDE_DIRS ${LIBSOUP_INCLUDE_DIRS}  ${WEBCORE_DIR}/platform/network/soup
	    ${GLIB_INCLUDE_DIRS})
else()
    set(NETWORK_INCLUDE_DIRS ${CURL_INCLUDE_DIRS} ${WEBCORE_DIR}/platform/network/curl)
endif()	

list(APPEND WebKit_INCLUDE_DIRECTORIES "${NETWORK_INCLUDE_DIRS}")
message("****NETWORK_INCLUDE_DIRS=${NETWORK_INCLUDE_DIRS}")

list(APPEND WebKit_INCLUDE_DIRECTORIES
    "${WEBCORE_DIR}/accessibility/cdroid"
    "${WEBCORE_DIR}/page/cdroid"
    "${WEBCORE_DIR}/platform/graphics/cairo"
    "${WEBCORE_DIR}/platform/graphics/cdroid"
    "${WEBCORE_DIR}/platform/graphics/opentype"
    "${NETWORK_INCLUDE_DIRS}"
    "${WEBCORE_DIR}/platform/cdroid"
    "${CAIRO_INCLUDE_DIRS}"
    "${FREETYPE2_INCLUDE_DIRS}"
    "${HARFBUZZ_INCLUDE_DIRS}"
    "${GLIB_INCLUDE_DIRS}"
    "${CDROID_INCLUDE_DIRS}"
    "${WEBKIT_DIR}/cdroid"
    "${WEBKIT_DIR}/cdroid/WebCoreSupport"
    "${WEBKIT_DIR}/cdroid/WebKitSupport"
)

list(APPEND WebKit_SOURCES
    cdroid/WebView.cpp
    cdroid/WebKitLogging.cpp
    cdroid/WebCoreSupport/ChromeClientCd.cpp
    cdroid/WebCoreSupport/ContextMenuClientCd.cpp
    cdroid/WebCoreSupport/DragClientCd.cpp
    cdroid/WebCoreSupport/EditorClientCd.cpp
    cdroid/WebCoreSupport/FrameLoaderClientCd.cpp
    cdroid/WebCoreSupport/FrameNetworkingContextCd.cpp
    cdroid/WebCoreSupport/InspectorClientCd.cpp
    cdroid/WebCoreSupport/ProgressTrackerClientCd.cpp
    cdroid/WebCoreSupport/PlatformStrategiesCd.cpp
)

list(APPEND WebKit_SOURCES__
    #cdroid/WebBrowserShell.cpp  
    #cdroid/WebDOMSelection.cpp  
    #cdroid/WebEdit.cpp  
    cdroid/WebFrame.cpp  
    cdroid/WebSettings.cpp  
    cdroid/WebView.cpp
    cdroid/WebKitSupport/ChromeClientWx.cpp  
    cdroid/WebKitSupport/ContextMenuClientWx.cpp  
    cdroid/WebKitSupport/DragClientWx.cpp  
    cdroid/WebKitSupport/EditorClientWx.cpp  
    cdroid/WebKitSupport/FrameLoaderClientWx.cpp 
    cdroid/WebKitSupport/InspectorClientWx.cpp
)
